<?php 


/** 
***************************************************
*欢迎使用免费版xSite企业自助建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.php.net.cn/xsite/ 
***************************************************
**/




 $swap_text_links = $swap_img_links = array(); if (!empty($swap_links)) { $swap_links = str_replace('，', ',', $swap_links); $swap_links = preg_replace('/[\n]+/is', ',', $swap_links); $swap_links = explode(",", $swap_links); if (is_array($swap_links) && count($swap_links)) { foreach ($swap_links as $k => $v) { $v = preg_replace('/[\s]+/is', '', $v); $temp = @explode('|', $v); if (is_array($temp) && count($temp) == 2) { $swap_text_links[$k]['name'] = $temp[0]; $swap_text_links[$k]['href'] = $temp[1]; } if (is_array($temp) && count($temp) == 3) { $swap_img_links[$k]['name'] = $temp[0]; $swap_img_links[$k]['href'] = $temp[1]; $swap_img_links[$k]['src'] = $temp[2]; } } } } if (!empty($online_service)) { $online_service = str_replace('：', ':', $online_service); $online_service = explode("\n", $online_service); $online_service_info = array(); if (is_array($online_service) && count($online_service)) { $online_service_info['qq'] = $online_service_info['tel'] = $online_service_info['ww'] = array(); foreach ($online_service as $k => $v) { $v = preg_replace('/[\s]+/is', '', $v); $temp = @explode(':', $v); if (strtolower($temp[0]) == 'qq' && !empty($temp[1])) { $online_service_info['qq'][] = $temp[1]; } if (strtolower($temp[0]) == 'tel' && !empty($temp[1])) { $online_service_info['tel'][] = $temp[1]; } if (strtolower($temp[0]) == 'tb' && !empty($temp[1])) { $online_service_info['tb'][] = $temp[1]; } if (strtolower($temp[0]) == 'ww' && !empty($temp[1])) { $online_service_info['ww'][] = $temp[1]; } } } $online_service = $online_service_info; unset($online_service_info, $temp); }